package com.atguigu.gmall.activity.client;

import com.atguigu.gmall.common.result.Result;
import com.atguigu.gmall.model.activity.SeckillGoods;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;

@FeignClient(value = "service-activity", fallback = SeckillFeignDegradeClient.class)
public interface SeckillFeignClient {

    @GetMapping("/api/activity/seckill/get/all/sec/kill/goods")
    Result<List<SeckillGoods>> getAllSeckillGoods();

    @GetMapping("/api/activity/seckill/get/sec/kill/goods/{skuId}")
    Result<SeckillGoods> getSecKillGoodsBySkuId(@PathVariable("skuId") Long skuId);

    @GetMapping("/api/activity/seckill/auth/get/data/for/trade")
    Result<Map<String, Object>> getDataForTrade();

}
